
function SparkApp(appName,appType) {
    this.appName=appName;
    this.appType=appType;
    this.appParameters={};
    this.sparkProperties={};
    this.environmentVariables={};

    this.putAppParameter=function (key,value) {
      this.appParameters[key]=value;
    };
    this.putSparkProperty=function (key,value) {
        this.sparkProperties[key]=value;
    };
    this.putEnvironmentVariable=function (key,value) {
        this.environmentVariables[key]=value;
    };

    this.getParameters=function () {

        var parameters={};
        for(var key in this.appParameters){
            parameters[key]=this.appParameters[key];
        }
        parameters.sparkProperties=this.sparkProperties;
        parameters.environmentVariables=this.environmentVariables;
        return parameters;
    };

    this.getAppName=function () {
        return this.appName;
    };

    this.getAppType=function () {
        return this.appType;
    };
}
